<template>
<div>
<mycate :data = 'data'></mycate>

</div>
  
</template>

<script>
import axios from 'axios'
import mycate from '@/components/mycate';
export default {
    data(){

        return {
            data:{},
        }
    },
    components:{
        mycate
    },
    mounted(){
        this.get_data();

    },
    methods:{
        get_data(){
            axios.get('http://localhost:8000/cate/').then((res)=>{
                console.log(res)
                var mytree = {'id':0,name:''};
                mytree['childer'] = res.data;
                this.data = mytree
            
            })
        }
    }
}
</script>

<style>

</style>